﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Utility.Global;

namespace Application_Core.Kunde_Component.Data_Access_Layer
{
    public class AdresseDTO : DataTransferObject, ConvertableToEntity<Adresse>
    {
        public virtual string Strasse { get; set; }

        public virtual string Hausnummer { get; set; }

        public virtual int PLZ { get; set; }

        public virtual string Ort { get; set; }

        public AdresseDTO() { }

        public AdresseDTO(string strasse, string hausnummer, int plz, string ort)
        {
            this.Strasse = strasse;
            this.Hausnummer = hausnummer;
            this.PLZ = plz;
            this.Ort = ort;
        }


        public virtual Adresse ToEntity()
        {
            Adresse adresse = new Adresse();
            adresse.Strasse = this.Strasse;
            adresse.Hausnummer = this.Hausnummer;
            adresse.PLZ = this.PLZ;
            adresse.Ort = this.Ort;
            return adresse;
        }
    }
}
